﻿using System;
using Klear.Library.Services;

namespace Klear.Services;

public class RootNavigationService : IRootNavigationService
{
    public void NavigateTo(string view) {
        ServiceLocator.Current.MainWindowViewModel.Content = view switch {
            RootNavigationConstant.InitializationView => ServiceLocator.Current
                .InitializationViewModel,
            RootNavigationConstant.MainView => ServiceLocator.Current
                .MainViewModel,
            _ => throw new Exception("unknown view")
        };
    }
}
// #3498DB 蓝色
// 55, 172, 111 绿色